﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace Small.Document
{
   public   class PathInfo
    {
       /// <summary>
        /// 获取网站的临时目录
       /// </summary>
       /// <param name="httpContext"></param>
       /// <param name="date">当前日期</param>
       /// <returns></returns>
       public static String TempPath(HttpContext httpContext) 
       {
           
           String applicationPath = httpContext.Request.PhysicalApplicationPath;
            string tempPath=Small.Document.Properties.Settings.Default.TempPath;
            return applicationPath + Path.DirectorySeparatorChar + tempPath + Path.DirectorySeparatorChar ;
       }
       /// <summary>
       /// 获取网站的临时目录
       /// </summary>
       /// <param name="httpContext"></param>
       ///  /// <param name="date">当前日期</param>
       /// <returns></returns>
       public static String TempPath(HttpContextBase httpContext)
       {
           String applicationPath = httpContext.Request.PhysicalApplicationPath;
           string tempPath = Small.Document.Properties.Settings.Default.TempPath;
           return applicationPath + Path.DirectorySeparatorChar + tempPath + Path.DirectorySeparatorChar ;
       }

       /// <summary>
       /// 存储文件的路径
       /// </summary>
       /// <returns></returns>
       public static String RemoteServerPath()
       {
           String remoteServer = Small.Document.Properties.Settings.Default.RemoteServer;
           string uploadPath = Small.Document.Properties.Settings.Default.UploadPath;


           return @"\\" + remoteServer + @"\";
           
       }
    }
}
